{extend name="pc/admin/layout"/}
{block name="main"}
  <div class="g-1400 g-container" id="pjax-container">
        
<div class="bg-bai b rx3" id="vue-page">
<form id="form-config">
    <div class="t-v t-t">
        <div class="c-sidebar c-sidebar-h pb5 br">
            <div class="c-sidebar-title t-v hui bb">网站基础设置</div>
            <ul class="c-nav click-nav">
                <li><a href="{:url('pc/admin')}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>网站信息</div>
                </a></li>
				<li><a href="{:url('pc/admin',['act'=>'set','s'=>'reg'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>注册奖励</div>
                </a></li>
				<li><a href="{:url('pc/admin',['act'=>'set','s'=>'mail'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>邮箱提醒</div>
                </a></li>
				<li><a href="{:url('pc/admin',['act'=>'set','s'=>'chat'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>聊天发言</div>
                </a></li>
				{if condition="config('web_web_id') eq 1"}
				<li><a href="{:url('pc/admin',['act'=>'set','s'=>'task'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>任务运行</div>
                </a></li>
				<li><a href="{:url('pc/admin',['act'=>'set','s'=>'cron'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>任务监控</div>
                </a></li>
				{/if}
				<li class="active"><a href="{:url('pc/admin',['act'=>'set','s'=>'plugins'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>网站插件</div>
                </a></li>
				{if condition="config('web_web_id') eq 1"}
				<li><a href="{:url('pc/admin',['act'=>'set','s'=>'server'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>服务器设置</div>
                </a></li>
				{/if}
            </ul>
        </div>
		<div class="c-content bl">
            <div class="g-title t-v pl4 bb">
				<div class="col-12 h t-v bold">插件管理</div>
			</div>
            <div class="g-content p5">
				<div class="p5 o-h">
					<div class="pt1 pb3 in-text">
						<dt class="bold bb pr2 lan">QQ访问地址跳出提示页</dt>
						<dd><select class="form w h8 bb" name="is_qqjump" default="{:config('sys_is_qqjump')}">
							<option value="0">关闭</option>
							<option value="1" {if condition="config('sys_is_qqjump') eq 1" }selected {/if}>开启</option>
						</select></dd>
					</div>
					<div class="pt1 pb3 in-text">
						<dt class="bold bb pr2 lan">开启网站音乐播放器</dt>
						<dd><select class="form w h8 bb" name="is_music_player" default="{:config('sys_is_music_player')}">
							<option value="0">关闭</option>
							<option value="1" {if condition="config('sys_is_music_player') eq 1" }selected {/if}>开启</option>
						</select></dd>
					</div>
					<div id="frame_set2" style="display:none">
					<div class="pt1 pb3 in-text">
						<dt class="bold bb pr2 lan">播放器样式</dt>
						<dd><select class="form w h8 bb" name="player_style" default="{:config('sys_player_style')}">
							<option value="0" {if condition="config('sys_player_style') eq 0" }selected {/if}>XPlayer</option>
							<option value="1" {if condition="config('sys_player_style') eq 1" }selected {/if}>明月浩空</option>
						</select></dd>
					</div>
					<div class="pt1 pb3 in-text">
							<dt class="bold bb pr2 lan">播放器KEY</dt>
							<dd><input class="form w h8 bb" type="text" name="player_key" value="{:config('sys_player_key')}"></dd>
					</div>
					<div class="pt1 pb3 in-text">
						<dd class="lv">播放器KEY申请地址<a href="https://duww.top/">[杜雯雯播放器]</a></dd>
					</div>
					</div>
				</div>
            </div>
        </div>
</div>
</form>
<div class="c-pagination o-h t-v">
        <div class="c-sidebar"></div>
        <div class="c-content h11 o-h g-btn t-v bt bl">
            <div class="col-12 h t-v f3 hui pl5 pr5 t-c">
			<button class="btn btn-qing btn-md w22 rx1" @click="saveConfig()">保 存 设 置</button></div>
        </div>
    </div>
</div>

    </div>
   {/block}
   {block name='foot'}
		<script>
        new Vue({
            el: '#vue-page',
            methods: {
                saveConfig: function () {
                    app.ajax("{:url('admin_ajax/config')}", $("#form-config").serialize(), function (data) {
                        if (data.code === 0) {
                            x.msg(data.message)
                        } else {
                            x.msg(data.message)
                        }
                    })
                }
            }
        });
		$("select[name='is_music_player']").change(function(){
			if($(this).val() == 1){
				$("#frame_set2").css("display","inherit");
			}else{
				$("#frame_set2").css("display","none");
			}
		});
		if ($("select[name='is_music_player']").val() == 1){
			$("#frame_set2").css("display","inherit");
		}
    </script>
    {/block}